@page "/Admin/Logs"

@using BlazorAdmin.Models
@using BlazorAdmin.Web.Shared.Components
@using BlazorAdmin.Web.Shared.Models

<AdminTable TItem=Log IsPagination=true CustomerSearchModel=@TableSearchModel SortString=@SortString
            ShowDefaultButtons=false ShowExtendButtons=false ShowCardView=true IsMultipleSelect=false>
    <TableColumns>
        <TableColumn @bind-Field="context.RequestUser" Width=99 Filterable="true" Searchable="true" Sortable="true"></TableColumn>
        <TableColumn @bind-Field="context.RequestUrl" Width=174 Filterable="true" Searchable="true" Sortable="true"></TableColumn>
        <TableColumn @bind-Field="context.RequestData" ShowTips="true" Filterable="true" Searchable="true" Sortable="true"></TableColumn>
        <TableColumn @bind-Field="context.RequestMethod" Width=75 Filterable="true" Searchable="true" Sortable="true"></TableColumn>
        <TableColumn @bind-Field="context.RequestProtocol" Width=75 Filterable="true" Searchable="true" Sortable="true"></TableColumn>
        <TableColumn @bind-Field="context.BizID" Width=115 Filterable="true" Searchable="true" Sortable="true"></TableColumn>
        <TableColumn @bind-Field="context.ClientIP" Width=115 Filterable="true" Searchable="true" Sortable="true"></TableColumn>
        <TableColumn @bind-Field="context.Browser" ShowTips="true" Width=115 Filterable="true" Searchable="true" Sortable="true"></TableColumn>
        <TableColumn @bind-Field="context.OS" ShowTips="true" Width=115 Filterable="true" Searchable="true" Sortable="true"></TableColumn>
        <!--<TableColumn @bind-Field="context.UserAgent" Filterable="true" Searchable="true" Sortable="true"></TableColumn>-->
        <TableColumn @bind-Field="context.LogTime" Filterable="true" Searchable="true" Sortable="true" Width=148 FormatString=@SysConsts.FormatTime></TableColumn>
    </TableColumns>
    <CustomerSearchTemplate Context="v">
        @if (v is LogSearchModel m)
        {
            <LogSearch @bind-Value="m"></LogSearch>
        }
    </CustomerSearchTemplate>
</AdminTable>
